package com.example.zhidao.model.vo;

import com.example.zhidao.model.po.Comments;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

@Component
@Data
public class CommentVo{
    private String id;
    private String comment;
    private int type;
    private String upuser;
    private String uid;
    private String bid;
    private int good;
    @DateTimeFormat(pattern = "yyyy-dd HH:mm:ss") // 从前端接收数据时，需要进行的转换
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") // 返回到前端时，需要进行的转换
    private Date createtime;
    private String username;
    private String img;
    private String topid;
    private int isliked;
    private List<CommentVo> children;


}
